<?php

/**
 * 
 * 首页格子模型
 */
class PayLinkModel extends Model {

    public function _initialize() {
        
    }

    public function newLink($link, $days, $type = 'gezi') {
        $data = array(
            'url' => 'http://'.t(trim(trim($link, 'http://'), 'https://')),
            'con_id' => 0,
            'con_type' => $type,
            'star_time' => time(),
            'end_time' => time() + 24 * 3600 * $days,
            'days' => $days,
            'link_status' => 1,
        );
        return $this->add($data);
    }

}

?>
